// 主类型
interface AA {
    name:string,
    age:number
}
// 子类型
interface BB {
    name:string,
    age:number,
    sex:string
}
let q:AA = {
    name:'老墨',
    age:33
}
let w:BB = {
    name:'高启强',
    age:22,
    sex:'女'
}
// 协变,子类型赋值给主类型
q = w

let funa = (parsms:AA)=>{}
let funb = (parsms:BB)=>{}
funb = funa         //逆变
// funa =funb       //非严格模式下可以双向协变
